import 'package:distribution_mall_flutter/constant/cf_constant.dart';
import 'package:distribution_mall_flutter/constant/constant.dart';
import 'package:distribution_mall_flutter/generated/l10n.dart';
import 'package:distribution_mall_flutter/utils/common_widget.dart';
import 'package:distribution_mall_flutter/router/router.gr.dart';
import 'package:flutter/material.dart';
import 'package:skeletonizer/skeletonizer.dart';

class FloatLogin extends StatelessWidget {
  const FloatLogin({super.key});

  @override
  Widget build(BuildContext context) {
    return Skeleton.ignore(
        child: Container(
      height: 45.5,
      // padding: const EdgeInsets.only(
      //     left: EdgeConstant.edge146, right: 8.2),
      // margin: const EdgeInsets.symmetric(horizontal: EdgeConstant.edge146),
      decoration: BoxDecoration(
          color: const Color.fromRGBO(20, 20, 20, 0.8),
          borderRadius: BorderRadius.circular(7.3)),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: [
          Text(
            S.current.home_log_in,
            style: const TextStyle(
                color: Colors.white,
                fontSize: FontConstant.f146,
                letterSpacing: TextConstant.letterSpacing),
          ),
          CommonBtnWidget.generalBtn(() {
            appRouter.push(const LoginRoute());
          },
              width: 68.3,
              height: 30,
              radius: 15,
              text: S.current.LOG_IN,
              border: Border.all(
                width: 0.9,
                color: const Color.fromRGBO(84, 131, 191, 1),
              ),
              color: const Color.fromRGBO(84, 131, 191, 1))
        ],
      ),
    ));
  }
}
